<?php

namespace app\common\service;

use app\common\service\Base;
use app\common\model\Scene as SceneModel;

class Scene extends Base {

     public function __construct() {
         parent::__construct();
         $this->currentModel = new SceneModel();
     }

    /**
     * 获取场景图片列表
     * @return array|\PDOStatement|string|\think\Collection
     */
     public function getSceneList() {

         $map['status'] = config('enum.sceneStatus.valid.value');

         $list = $this->currentModel
             ->where($map)
             ->order('sort desc')
             ->select();

         return $list;

     }

    /**
     * 获取sort最大值
     * @return array|null|\PDOStatement|string|\think\Model
     */
     public function getMaxSort() {

         return $this->currentModel
             ->order('sort desc')
             ->find();

     }

}